import AES from 'crypto-js/aes'
const key = 'liershiqi No1. ^_^'
export function encryptAES(originText: string): string {
  if (originText) {
    const encrpty = AES.encrypt(originText, key)
    return encrpty.toString()
  }
  return ''
}
export function decryptAES(cipherText: string): string {
  if (cipherText) {
    const decrypted = AES.decrypt(cipherText, key).toString(CryptoJS.enc.Utf8)
    return decrypted
  }
  return ''
}
